package com.jeasonzhao.commons.basic;

public class Pair<KEY,PVALUE>
{
    private KEY m_key = null;
    private PVALUE m_firstValue = null;
    private PVALUE m_secondValue = null;
    public Pair()
    {
        super();
    }

    public Pair(KEY k,PVALUE p)
    {
        super();
        set(k,p);
    }

    public Pair(KEY k,PVALUE p,PVALUE p2)
    {
        super();
        set(k,p,p2);
    }

    public KEY getKey()
    {
        return m_key;
    }

    public PVALUE getValue()
    {
        return m_firstValue;
    }

    public PVALUE getSecondValue()
    {
        return m_secondValue;
    }

    public void setKey(KEY key)
    {
        m_key = key;
    }

    public void setFirstValue(PVALUE v)
    {
        m_firstValue = v;
    }

    public void setSecondValue(PVALUE v)
    {
        m_secondValue = v;
    }

    public KEY getFirst()
    {
        return m_key;
    }

    public PVALUE getSecond()
    {
        return m_firstValue;
    }

    public PVALUE getThird()
    {
        return m_secondValue;
    }

    public void setFirst(KEY k)
    {
        m_key = k;
    }

    public void setSecond(PVALUE p)
    {
        m_firstValue = p;
    }

    public void setThird(PVALUE p)
    {
        m_secondValue = p;
    }

    public void set(KEY k,PVALUE p)
    {
        m_key = k;
        m_firstValue = p;
    }

    public void set(KEY k,PVALUE p,PVALUE p2)
    {
        m_key = k;
        m_firstValue = p;
        m_secondValue = p2;
    }

}
